package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class OISDemo1 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("001.txt");
        ObjectInputStream ois = new ObjectInputStream(fis);
        Object ob = ois.readObject();
        Student1 str = (Student1) ob;
        System.out.println(str);
        ois.close();

    }
}
